Replace velero command references with oc oadp in CLI output#108
Merged
Joeavaikath merged 5 commits intomigtools:oadp-devfrom Jan 29, 2026
Merged
Replace velero command references with oc oadp in CLI output#108Joeavaikath merged 5 commits intomigtools:oadp-devfrom
Joeavaikath merged 5 commits intomigtools:oadp-devfrom
Conversation
Update command output and help text to show "oc oadp" instead of "velero" for better user experience. - Add "oc" prefix when replacing velero command references - Wrap RunE functions to capture and replace runtime output - Update usage template to show "oc oadp" in help text Example: `velero backup describe` → `oc oadp backup describe` Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Joseph <jvaikath@redhat.com>
Implements get command for NonAdminBackupStorageLocation resources with support for both verb-first and noun-first syntax: - oc oadp nonadmin get bsl - oc oadp nonadmin bsl get The table output displays NAME, REQUEST PHASE, PROVIDER, BUCKET/PREFIX, and AGE. Supports -o yaml/json output formats. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Joseph <jvaikath@redhat.com>
Adds test coverage for BSL get and create commands: - Tests for noun-first order (nonadmin bsl get/create) - Tests for verb-first order (nonadmin get/create bsl) - Tests for shorthand alias 'na' - Tests for help flags (--help and -h) - Tests for command structure and availability - Tests for client config integration - Tests for proper flag registration - Tests for output format verification (oc oadp prefix) These tests ensure both command orders work correctly and help text shows the proper "oc oadp" prefix throughout. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Joseph <jvaikath@redhat.com>
Update root_test.go tests to expect "oc oadp" instead of just "oadp" to match the behavior introduced in commit 775fbcc. Also fix a bug in replaceVeleroCommandWithOADP where newlines were not properly handled. The function now preserves newlines when replacing velero commands, ensuring multi-line examples are formatted correctly. Changes: - Update all test expectations from "oadp" to "oc oadp" - Add newline (\n) to the HasPrefix check in replacement function - Add debug output to MultipleOccurrences test for better diagnostics Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Joseph <jvaikath@redhat.com>
The CLI binary build was timing out in CI after 30 seconds, causing test failures with "signal: killed". This increases the build timeout from 30 seconds to 2 minutes to accommodate slower CI environments. The TestTimeout constant remains at 30 seconds for running commands, while the new BuildTimeout constant of 2 minutes is used specifically for the binary build step which requires more time in CI due to: - Limited CPU resources - Cold build caches - Network latency for dependencies Fixes test failures in CI with "Failed to build CLI binary: signal: killed" Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Joseph <jvaikath@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why the changes were made
Update command output and help text to show "oc oadp" instead of "velero" for better user experience.
Example:
velero backup describe→oc oadp backup describegetcommand for NABSLoc oadp nonadmin bsl getHow to test the changes made
Run
oc oadp backup createand check the outputRun any help command and see that usage has the
ocprefixFixes #102, #49